home *** CD-ROM | disk | FTP | other *** search
/ Aminet 8 / Aminet 8 (1995)(GTI - Schatztruhe)[!][Oct 1995].iso / Aminet / util / batch / chequals.readme < prev    next >
Text File  |  1995-09-20  |  3KB  |  105 lines

  1. Short:    Checks for qual's and sets return code
  2. Author:   Thomas Ansorge, Dinkelackerring 55, D-67435 Neustadt a. d. Weinstraße
  3. Uploader: thomas.ansorge@stud.uni-karlsruhe.de (valid until about Nov-95)
  4. Type:     util/cli
  5.  
  6. The file CheckQualifiers.doc follows. Note that there is also a German file
  7. Checkqualifiers.dok in the archive.
  8.  
  9.  
  10.                               CheckQualifiers
  11.                               ~~~~~~~~~~~~~~~
  12.                               
  13.                                 Version 1.4
  14.                                 
  15.                                 15-Jan-1995
  16.  
  17.  
  18. Legal Stuff:
  19. ~~~~~~~~~~~~
  20. DISCLAIMER: CHECKQUALIFIERS SOFTWARE IS PROVIDED "AS-IS", NO WARRANTIES OF
  21. ANY KIND ARE MADE. ALL USE IS AT YOUR OWN RISK.
  22.  
  23. Copyright: Freeware
  24.  
  25. CheckQualifiers was written on an A4000 with OS 3.1 (V40), but should work
  26. on all 68000 based machines with OS 2.04 (V37) and up.
  27.  
  28.  
  29. Description:
  30. ~~~~~~~~~~~~
  31. CheckQualifiers is a small CLI utility meant for use in scripts. It checks
  32. if a given set of qualifiers is currently pressed or not and sets its
  33. return code accordingly. There is no output unless you ask for the template
  34. or an error occurs, so a closed cli window will (hopefully) not pop up.
  35.  
  36. Template:
  37. LSHIFT/S,RSHIFT/S,CAPSLOCK/S,CONTROL/S,LALT/S,RALT/S,LCOMMAND/S,RCOMMAND/S,
  38. MIDBUTTON/S,RIGHTBUTTON/S,LEFTBUTTON/S
  39.  
  40. Example:
  41. ~~~~~~~~
  42. We check for both LSHIFT and LALT. The return code is returned in $rc, as
  43. all good programs should do. If there are more than one IF to react to the
  44. qualifiers, we need to store $rc in one of our variables because IF changes
  45. the contents of $rc.
  46.  
  47.     CheckQualifiers LSHIFT LALT
  48.     Echo >ENV:cqrc $rc ; save $rc to $cqrc
  49.     
  50.     IF VAL $cqrc EQ 0
  51.         Echo "neither LSHIFT nor LALT"
  52.     ENDIF
  53.     
  54.     IF VAL $cqrc EQ 1
  55.         Echo "LSHIFT or LALT, but not both"
  56.     ENDIF
  57.     
  58.     IF VAL $cqrc EQ 2
  59.         Echo "LSHIFT and LALT and something else"
  60.     ENDIF
  61.     
  62.     IF VAL $cqrc EQ 3
  63.         Echo "LSHIFT and LALT and nothing else"
  64.     ENDIF
  65.     
  66.     UnSetEnv cqrc
  67.  
  68. EQ checks for equality. You can use GT, GE, NOT GT and NOT GE to check for
  69. >, >=, <=, <, respectively.
  70.  
  71. Author:
  72. ~~~~~~~
  73. Thomas Ansorge
  74. Dinkelackerring 55
  75. D-67435 Neustadt an der Weinstraße
  76. Germany
  77. EUROPE
  78.  
  79. Greetings go to...
  80. ~~~~~~~~~~~~~~~~~~
  81. my beta-testers Michael and Stephan,
  82.  
  83. and all authors, who publish something and do not ask for anything in
  84. return.
  85.  
  86. Happy checking! Th. :-})
  87.  
  88.  
  89. ============================= Archive contents =============================
  90.  
  91. Original  Packed Ratio    Date     Time    Name
  92. -------- ------- ----- --------- --------  -------------
  93.      628     271 56.8% 16-Apr-95 14:03:56  CheckQuals.info
  94.     2376    1717 27.7% 16-Apr-95 14:03:10 +CheckQualifiers
  95.     2002    1017 49.2% 16-Apr-95 13:59:54 +CheckQualifiers.doc
  96.     1091     322 70.4% 07-Mar-95 21:05:22 +CheckQualifiers.doc.info
  97.     2253    1129 49.8% 16-Apr-95 14:05:10 +CheckQualifiers.dok
  98.     1091     322 70.4% 07-Mar-95 21:05:22 +CheckQualifiers.dok.info
  99.      834     490 41.2% 16-Apr-95 14:01:02 +Product-Info
  100.      563     252 55.2% 16-Apr-95 13:51:04 +Product-Info.info
  101.     1026     458 55.3% 16-Apr-95 14:03:02 +CheckQualifiers.log
  102.     6226    2043 67.1% 16-Apr-95 14:03:02 +CheckQualifiers.mod
  103. -------- ------- ----- --------- --------
  104.    18090    8021 55.6% 02-Jul-95 23:06:46   10 files
  105.